function [oldSequenceFile, newSequenceFile, currPos, currPos_seq, currPos_tour, ...
    newTourSites, newTourIdx]=readInput(inputFile)

fid=fopen(inputFile,'r');

oldSequenceFile=fgetl(fid);
newSequenceFile=fgetl(fid);
line=fgetl(fid);

currPos_tour=0;
newTourSites=[];
newTourIdx=[];

while ischar(line)
    coordinates=sscanf(line, '%f',[1,3]);
    status=sscanf(line, '%*f %*f %*f %c %*d',1);
    tourIdx=sscanf(line, '%*f %*f %*f %*s %d',1);
    
    if status=='c'
        currPos=coordinates;
        line=fgetl(fid);
        currPos_seq=sscanf(line,'%d',1)+1;
        break;
    elseif status=='d'
        line=fgetl(fid);
        continue;
    else
        if status=='v'
            currPos_tour=tourIdx+1;
        end
            
        newTourSites=[newTourSites; coordinates];
        newTourIdx=[newTourIdx; tourIdx+1];
    end
    
	line=fgetl(fid);	
end

fclose(fid);
end